﻿using System.Data.Entity.ModelConfiguration;

using EditorialProyectos.Business.Entities;

namespace EditorialProyectos.DataAccess.Configurations
{
    internal class ProfileConfiguration : EntityTypeConfiguration<Profile>
    {
        public ProfileConfiguration()
        {
            this.HasKey(e => e.Id);

            this.HasRequired(e => e.User)
                .WithRequiredDependent(r => r.Profile)
                .WillCascadeOnDelete(true);
        }
    }
}
